#include "IIPCWndCallBack.h"

IIPCWndCallBack::IIPCWndCallBack()
{
}

IIPCWndCallBack::~IIPCWndCallBack(void)
{
}

LRESULT IIPCWndCallBack::OnProcessCopyData(WPARAM wParam, COPYDATASTRUCT* pCopyData)
{
#define _TAGWSTRING_ 34589
#define _TAGASTRING_ 34588
    if (wParam == _TAGWSTRING_ && pCopyData && pCopyData->lpData)
    {
        if (S_FALSE == OnReceiveString((LPCWSTR)pCopyData->lpData, (ULONG)pCopyData->dwData))
        {
            return OnReceiveString((LPCWSTR)pCopyData->lpData);
        }
    }
    else if (wParam == _TAGASTRING_ && pCopyData && pCopyData->lpData)
    {
        if (S_FALSE == OnReceiveString((LPCSTR)pCopyData->lpData, (ULONG)pCopyData->dwData))
        {
            return OnReceiveString((LPCSTR)pCopyData->lpData);
        }
    }
    return OnReceiveCopyData(wParam, pCopyData);
}
